# import animal_demo
from animal_demo import Animal
from cat_demo import Cat

# Animal.eat()
# cat = animal_demo.Animal("katti","橘色","雌","橘猫")
cat = Animal("katti","橘色","雌","橘猫")
# cat.to_String()
# animal_demo.Animal.to_String()
# print(cat.__type)
# print(animal_demo.Animal.type)
# print(Animal.__type)  # 私有化变量不能通过类名或对象名直接访问
print(cat.ethnic)

cat.to_String()

# cat.__speak()  # 私有化方法不能通过类名或对象名直接访问
cat.interface_demo()

# print(cat._Animal__name)
# cat._Animal__speak()


black_cat = Cat("墨墨","黑色","雄","野猫")
# print(black_cat.__type)   # 子类不能继承父类的私有变量
print(black_cat.ethnic)

# black_cat.__speak()   # 子类不能继承父类的私有方法
black_cat.sleep()
black_cat.to_String()
black_cat.interface_demo()

print(black_cat.long_or_short)

black_cat.run()
black_cat.interface_cat()